<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>JSP for ModifyatomForm form</title>
		<link rel="stylesheet" type="text/css" href="css/default.css">
		<title></title>
		<script type="text/javascript">
		function opchange(o){
			document.modifyatomForm.operation.value=o;
			if(o=='del'){
				c=confirm("确认删除");
			}else if(o=='mod'){
				c=confirm("确认修改");
			}else if(o=="list"){
				c=true;
			}
			if(c){
				document.modifyatomForm.submit();
			}
		}
	</script>
	</head>
	<body>

		<%
		String way = request.getParameter("way");
		%>
		<html:form action="/modifyatom.do">
			<%
			if (way.equals("1")) {
			%>
			<table width="400" border="0" align="center" cellpadding="5" cellspacing="1"
				bgcolor="#FF9900">
				<tr>
					<td class="alt">
						<div id=groupdiv>
							原子组名 :
						</div>
					</td>
					<td>
						<html:select property="prename">
							<html:option value="">请选择原子标签</html:option>
							<logic:iterate name="allBookmark" id="bm">
								<html:option value="${bm.BOOKMARK_ID}">${bm.BOOKMARK_NAME}</html:option>
							</logic:iterate>
						</html:select>
						<script type="text/javascript">
						document.modifyatomForm.prename.value=<bean:write name="groupinfo" property="BOOKMARK_ID"/>
						</script>
						<html:errors property="prename" />
					</td>
				</tr>
				<tr>
					<td class="alt">
						<div id=namediv>
							原子名称 :
						</div>
					</td>
					<td>

						<input type=text name="name"
							value=<bean:write name="groupinfo" property="ATOM_GROUP_NAME"/>>
						<html:errors property="name" />
					</td>
				</tr>
				<tr>
					<td class="alt">
						<div id=BIZ_DESCdiv>
							原子描述 :
						</div>
					</td>
					<td>
						<input type=text name="BIZ_DESC"
							value=<bean:write name="groupinfo" property="ATOM_GROUP_DESC"/>>
						<html:errors property="BIZ_DESC" />
						<input type=hidden name="checkid"
							value="<bean:write name="groupinfo" property="ATOM_GROUP_ID"/>">
					</td>
				</tr>
			</table>
			<%
				}
				if (way.equals("2")) {
			%>
			<table width="400" border="0" align="center" cellpadding="5" cellspacing="1"
				bgcolor="#FF9900">
				<tr>
					<td>所属原子组</td>
					<td>
						<html:select property="prename">
							<html:option value="">请选择原子组</html:option>
							<logic:iterate name="allGroupList" id="i">
								<logic:greaterThan name="i" property="BOOKMARK_ID" value="7">
									<option value="${i.ATOM_GROUP_ID}"  <logic:equal name="i" property="ATOM_GROUP_ID" value="${relGroupId}">selected</logic:equal>>
										<bean:write name="i" property="ATOM_GROUP_NAME" />
									</option>
								</logic:greaterThan>
							</logic:iterate>
						</html:select>
					</td>
				</tr>
				<tr>
					<td>
						<div id=namediv>
							原子名称 :
						</div>
					</td>
					<td>

						<input type=text name="name"
							value=<bean:write name="atominfo" property="BIZ_ATOM_NAME"/>>
						<html:errors property="name" />
					</td>
				</tr>
				<tr>
					<td>
						<div id=BIZ_DESCdiv>
							原子描述 :
						</div>
					</td>
					<td>
						<input type=text name="BIZ_DESC"
							value=<bean:write name="atominfo" property="BIZ_ATOM_DESC"/>>
						<html:errors property="BIZ_DESC" />
					</td>
				</tr>
				<tr>
					<td>
						值类型:
					</td>
					<td>
						<html:select property="VALUE_TYPE_ID">
							<option value="1">
								数字型
							</option>
							<option value="2">
								字符型
							</option>
						</html:select>
						<script language="javascript">   
    						document.modifyatomForm.VALUE_TYPE_ID.value="<bean:write name="atominfo" property="VALUE_TYPE_ID"/>";   
  						</script>
					</td>
				</tr>
				<tr>
					<td>
						展示方式：
					</td>
					<td>
						<html:select property="SHOW_TYPE_ID">
							<logic:iterate id="showtype" name="atomShowType">
								<option
									value="<bean:write name="showtype" property="SHOW_TYPE_ID"/>">
									<bean:write name="showtype" property="SHOW_TYPE_NAME" />
								</option>
							</logic:iterate>

						</html:select>
						<script language="javascript">   
    						document.modifyatomForm.SHOW_TYPE_ID.value="<bean:write name="atominfo" property="SHOW_TYPE_ID"/>";   
  						</script>
					</td>
				</tr>
				<tr>
					<td>
						代码来源表：
					</td>
					<td>
						<input type="text" name="CDE_SRC_TABLE_NAME"
							value=<bean:write name="atominfo" property="CDE_SRC_TABLE_NAME"/>>
					</td>
				</tr>
				<tr>
					<td>
						基础数据来源表：
					</td>
					<td>
						<input type="text" name="BAS_TABLE_NAME"
							value=<bean:write name="atominfo" property="BAS_TABLE_NAME"/>>
					</td>
				</tr>
				<tr>
					<td>
						基础表字段名：
					</td>
					<td>
						<input type="text" name="BAS_TABLE_COL_NAME"
							value=<bean:write name="atominfo" property="BAS_TABLE_COL_NAME"/>>
					</td>
				</tr>
				<tr>
					<td>
						基础表字段类型：
					</td>
					<td>
						<input type="text" name="BAS_TABLE_COL_TYPE"
							value=<bean:write name="atominfo" property="BAS_TABLE_COL_TYPE"/>>
					</td>
				</tr>
				<tr>
					<td>
						业务原子类别标识：
					</td>
					<td>
						<html:select property="ATOM_KIND_ID">

							<option value="2">
								只适用于客户
							</option>
							<option value="1">
								只适用于用户
							</option>
							<option value="3">
								适用于两者
							</option>
						</html:select>
						<script language="javascript">   
    						document.modifyatomForm.ATOM_KIND_ID.value="<bean:write name="atominfo" property="ATOM_KIND_ID"/>";   
  						</script>
					</td>
				</tr>
				<tr>
					<td>
						原子单位标志：
					</td>
					<td>
						<html:select property="BIZ_ATOM_FLAG">
							<option value="money">金额</option>
							<option value="time">时长</option>
							<option value="count">次数</option>
							<option value="other">其他</option>
						</html:select>
						<script language="javascript">   
    						document.modifyatomForm.BIZ_ATOM_FLAG.value="<bean:write name="atominfo" property="BIZ_ATOM_FLAG"/>";   
  						</script>
					</td>
				</tr>
				<tr>
					<td>
						源表中文字段名：
					</td>
					<td>
						<input type="text" name="SRC_TABLE_COL_NAME"
							value=<bean:write name="atominfo" property="SRC_TABLE_COL_NAME"/>>
					</td>
				</tr>

			</table>
			<input type=hidden name="checkid"
				value="<bean:write name="atominfo" property="BIZ_ATOM_ID"/>">
			<%
			}
			%><br>
			<center>
				<img src='images/button_modify.gif' width="63" height="21" onclick="opchange('mod')" />
				&nbsp;&nbsp;
				<img src='images/button_delete.gif' width="63" height="21" onclick="opchange('del')" />
				&nbsp;&nbsp;
				<img src='images/button_exit.gif' width="63" height="21" onclick="opchange('list')" />
			</center>
			<html:hidden property="operation" value="o" />
			<input name="way" type="hidden" value="<%=way%>">
		</html:form>
	</body>
</html>

